<?php
$batchCount = 1;
$batchdetails =  Courses::getCoursesBatch($model->id, $venueArrayVal);
foreach ($batchdetails as $batchValue) {
    /* ............................ Here is batch details start................................ */
    ?>
    <div class="tab-panes showBatchDetails" id="home<?php echo $venueArrayVal; ?>">
        <div class="venue-detail">
            <div class="detail-start">
                <h4>Batch details-<?php echo $batchCount; ?></h4>
            </div>  
            <table class="batch-detail">
                <tr>
                    <th>Start date</th>
                    <th>End Date</th>                    
                    <th>Price</th>
                </tr>
                <tr>
                    <td><?php echo $batchValue->date_from; ?></td>
                    <td><?php echo $batchValue->date_to; ?></td>                  
                    <td><?php echo ($batchValue->price==0)?'N/A':$batchValue->price; ?></td>
                </tr>
            </table>
            <?php
            /* --------------------  batch  EarlyDiscount  details Start------------------------------------ */
            $classEarlyDiscount = courses::getCourseBatchEarlyBirdDiscount($model->id, $batchValue->id);
            if (!empty($classEarlyDiscount)) {
                echo ' <h4>Early Discount</h4>';
                $this->renderPartial('/courseEarlyDiscount/_courseEarlyDiscount', array('classEarlyDiscount' => $classEarlyDiscount));
            }
            ?>
            <?php
            /* --------------------  Batch  GroupDiscount  details Start------------------------------------ */
            $classGroupDiscount = courses::getCourseBatchGroupDscount($model->id, $batchValue['id']);
            if (!empty($classGroupDiscount)) {
                echo ' <h4>Group Discount</h4>';
                $this->renderPartial('/courseGroupDiscount/_classGroupDiscount', array('classGroupDiscount' => $classGroupDiscount));
            }
            ?>

            <?php
            /* -------------------- Batch  GroupDiscount  details End------------------------------------ */
            /* -------------------- Batch  Batche day & date  Sessions  details start------------------------------------ */
            $customeDaysSessionForbatch = Courses::getCustomeSecheduleDaySession($model->id, $batchValue['id']);
            $customedateSessionForbatch = Courses::getCustomeSecheduledateSession($model->id, $batchValue['id']);
            $this->renderPartial('/batcheSession/_courseBatchSession', array('customeDaysSessionForbatch' => $customeDaysSessionForbatch, 'customedateSessionForbatch' => $customedateSessionForbatch));
            /* End of Batch  Batche day & date  Sessions */

            /* -------------------- Batch Schedule   details end------------------------------------ */
            /* -------------------- Batch ClassStructure   details end------------------------------------ */
            $classStructure =  Courses::getCourseStructure($model->id, $batchValue->id);
            if (!empty($classStructure)) {
                echo ' <h4>Class Structure </h4>';
                $this->renderPartial('/classStructures/_classCourseStructureDetails', array('classStructure' => $classStructure));
            }
            ?>


        </div><!--venue-detail end-->
    </div>

    <?php
$batchCount++;}
?>